<include file="Public/common" />
<block>
    <link rel="stylesheet" href="__STATIC__/layui/css/layui.css"  media="all">
    <style>
        .col-xs-3{margin-top:5px;}
        th{text-align: center;}
    </style>
</block>
<block name="content">
    <div class="page-header"><h1>首页 &gt;订单管理 > 订单列表</h1></div>
    <form action="" >
        <div class="col-xs-12 ">
            <div class="col-xs-3">
                <label for="" class="col-xs-4">订单号:</label>
                <div class="col-xs-8 text-left"><input type="text" class="form-control" /></div>
            </div>
            <div class="col-xs-3">
                <label for="" class="col-xs-4">线路名称:</label>
                <div class="col-xs-8 text-left"><input type="text"  class="form-control" /></div>
            </div>
            <div class="col-xs-3">
                <label for="" class="col-xs-4">下单时间:</label>
                <div class="col-xs-8 text-left"><input id="startDay" type="text" readonly class="form-control day" placeholder="下单开始时间" /></div>
            </div>
            <div class="col-xs-3">
                <label for="" class="col-xs-4">结束时间:</label>
            <div class="col-xs-8 text-left"><input id="endDay" type="text" readonly class="form-control day" placeholder="下单结束时间" /></div>

            </div>
            <div class="col-xs-3">
                <label for="" class="col-xs-4">出团日期:</label>
                <div class="col-xs-8 text-left"><input type="text" id="tourDay" readonly class="form-control day" /></div>
            </div>
            <div class="col-xs-3">
                <label for="" class="col-xs-4">团号:</label>
                <div class="col-xs-8 text-left"><input type="text" class="form-control" /></div>
            </div>
            <div class="col-xs-3">
                <label for="" class="col-xs-4">游客姓名:</label>
                <div class="col-xs-8 text-left"><input type="text" class="form-control" /></div>
            </div>
            <div class="col-xs-3">
                <label for="" class="col-xs-4">联系电话 :</label>
                <div class="col-xs-8 text-left"><input type="text" class="form-control" /></div>
            </div>
            <div class="col-xs-3">
                <label for="" class="col-xs-4">运营商 :</label>
                <div class="col-xs-8 text-left"><input type="text" class="form-control" /></div>
            </div>
            <div class="col-xs-3">
                <label for="" class="col-xs-4">订单状态 :</label>
                <div class=" col-xs-8">
                    <select name="" id="" class="form-control" >
                        <option value="">全部订单</option>
                    </select>
                </div>
            </div>
            <div class="col-xs-3">
                <button class="btn btn-primary">查询</button>
            </div>
        </div>

        <div class="col-xs-12"  style="margin-top:10px;">
            <button class="btn btn-primary btn-xs pull-right" type="button" id="dropdownMenu1" data-toggle="dropdown">
                筛选
                <span class="caret"></span>
            </button>
            <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="dropdownMenu1" style="padding:10px;">
                <li><input type="checkbox" class="filtrate" checked value="1" id="filtrate_1"> <label for="filtrate_1">ID</label> </li>
                <li><input type="checkbox" class="filtrate"checked value="2" id="filtrate_2"><label for="filtrate_2">订单号</label></li>
                <li><input type="checkbox" class="filtrate"checked value="3" id="filtrate_3"><label for="filtrate_3">游客姓名</label></li>
                <li><input type="checkbox" class="filtrate"checked value="4" id="filtrate_4"><label for="filtrate_4">联系电话</label></li>
                <li><input type="checkbox" class="filtrate"checked value="5" id="filtrate_5"><label for="filtrate_5">线路名称</label></li>
                <li><input type="checkbox" class="filtrate"checked value="6" id="filtrate_6"><label for="filtrate_6">团号</label></li>
                <li><input type="checkbox" class="filtrate"checked value="7" id="filtrate_7"><label for="filtrate_7">人数</label></li>
                <li><input type="checkbox" class="filtrate"checked value="8" id="filtrate_8"><label for="filtrate_8">下单时间</label></li>
                <li><input type="checkbox" class="filtrate"checked value="9" id="filtrate_9"><label for="filtrate_9">出团日期</label></li>
                <li><input type="checkbox" class="filtrate"checked value="10" id="filtrate_10"><label for="filtrate_10">状态</label></li>
                <li><input type="checkbox" class="filtrate"checked value="11" id="filtrate_11"><label for="filtrate_11">运营商</label></li>
            </ul>
            <button class="btn btn-primary btn-xs pull-right" style="margin-right: 10px">导出</button>
        </div>

    </form>

    <table class="table table-striped table-bordered table-hover table-condensed text-center">
        <thead>
            <tr>
                <th class="filtrate_1">ID <input type="checkbox" class="checkAll"></th>
                <th class="filtrate_2">订单号</th>
                <th class="filtrate_3">游客姓名</th>
                <th class="filtrate_4">联系电话</th>
                <th class="filtrate_5">线路名称</th>
                <th class="filtrate_6">团号</th>
                <th class="filtrate_7">人数</th>
                <th class="filtrate_8">下单时间</th>
                <th class="filtrate_9">出团日期</th>
                <th class="filtrate_10">状态</th>
                <th class="filtrate_11">运营商</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td class="filtrate_1" >001 <input type="checkbox" class="chk"></td>
                <td class="filtrate_2">广州一日游</td>
                <td class="filtrate_3">1</td>
                <td class="filtrate_4">成人</td>
                <td class="filtrate_5">联系方式</td>
                <td class="filtrate_6">预订人数：</td>
                <td class="filtrate_7">大：</td>
                <td class="filtrate_8">广州</td>
                <td class="filtrate_9">2017-08-14</td>
                <td class="filtrate_10">8</td>
                <td class="filtrate_11">8</td>
                <td>
                   <!-- <button class="btn btn-primary btn-xs" onclick="openDetail(0)">详情</button>-->
                    <a href="{:U('Product/detail',array('id'=>$vo['order_id']))}">详情</a>
                </td>
            </tr>
        <tr>
            <td colspan="12">
                <!--分页样式-->
                <ul class="pagination">
                    {$show}
                </ul>
            </td>
        </tr>
        </tbody>
    </table>

</block>
<block name="js">
<script src=""></script>
<script src="__STATIC__/layui/layui.all.js"></script>
<script src="__STATIC__/layui/layui.js"></script>
<script>
/**
 * 打开订单详情页面
 * @param  {[int]}    orderId     [订单id]
 */

//筛选显示
$('body').on('change','.filtrate',function () {
   var id=$(this).val();
   if($(this).is(':checked')){
        $('.filtrate_'+id).show();
   }else{
       $('.filtrate_'+id).hide();
   }
});


layui.use('laydate', function() {
    var laydate = layui.laydate;
    //常规用法
    laydate.render({
        elem: '#startDay'
    });
    laydate.render({
        elem: '#endDay'
    });
    laydate.render({
        elem: '#tourDay'
    });
})

/**
 *订单详情
 * @param orderId
 */

function openDetail(orderId){
    layer.open({
        type: 2,
        offset:20,
        area: ['90%','90%'],
        title: '订单详情',
        content: '{:U("Orders/detail")}',
    })
}
</script>
</block>
